<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 钟
  Date: 2017/3/15
  Time: 16:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>


<html>
<head>
    <link rel="stylesheet" type="text/css" href="${path}/css/public.css" />
    <link rel="stylesheet"
          href="${path}/css/themes/base/jquery.ui.all.css">
    <link rel="stylesheet" href="${path}/js/demos.css">

    <script type="text/javascript"
            src="${path}/js/jquery-1.7.2.js"></script>
    <script type="text/javascript"
            src="${path}/js/jquery.ui.core.js"></script>
    <script type="text/javascript"
            src="${path}/js/jquery.ui.widget.js"></script>
    <script type="text/javascript"
            src="${path}/js/jquery.ui.position.js"></script>
    <script type="text/javascript"
            src="${path}/js/jquery.ui.autocomplete.js"></script>
    <script type="text/javascript"
            src="${path}/js/jquery.ui.datepicker.js"></script>
    <%--<script type="text/javascript"--%>
            <%--src="${path}/js/jquery.ui.datepicker-zh-CN.js"></script>--%>
    <script src="${path}/js/jquery.ui.button.js"></script>
    <link rel="stylesheet" href="${path}/css/icons.css">
    <script src="${path}/js/icons.js"></script>


    <title>编辑员工
    </title>
</head>
<body>
<!--头部-->
<div class="header">




    <div class="top">
        <div class="top_left">
            <span class="f1">欢迎您：ADMIN</span>
        </div>
        <div class="top_right">
            <a href="${path}/index.html" class="top_ico0">首页</a>
            <a href="${path}/initUpdatePassword.action" class="top_ico1">修改密码</a>
            <a href="${path}/user/initPersonalInfo.action" class="top_ico2">个人信息</a>
            <a href="${path}/logout.action" class="top_ico3">退出</a>
        </div>
    </div>
    <div class="top2">
        <p class="pro_id">客户关系管理系统 v2.0</p>
    </div>
</div>

<!--主体-->
<table class="main" border="0"
       style="width: 100%; background-color: #FFFFFF">
    <tr>
        <td width="140" style="vertical-align: top;">
            <div class="main_left">



                <script type="text/javascript" src="${path}/js/jquery.ui.accordion.js"></script>

                <script type="text/javascript">
                    $().ready(function() {
                        $('.menuTitle').click(function() {//添加menuTitle的click事件
                            if ($(this).next().is(":hidden")) {//隐藏判断
                                $('.menu_ul_div').slideUp();//隐藏 */
                                $(this).next().slideDown();//显示
                            } else {
                                if ($(this).next().attr("id") == 'menu_ul_div_1') {

                                    $('.menu_ul_div').slideUp();//隐藏 */
                                    $('#menu_ul_div_2').slideDown();//显示

                                }
                                ;
                                if ($(this).next().attr("id") == 'menu_ul_div_2') {

                                    $('.menu_ul_div').slideUp();//隐藏 */
                                    $('#menu_ul_div_3').slideDown();//显示

                                }
                                ;
                                if ($(this).next().attr("id") == 'menu_ul_div_3') {

                                    $('.menu_ul_div').slideUp();//隐藏 */
                                    $('#menu_ul_div_4').slideDown();//显示

                                }
                                if ($(this).next().attr("id") == 'menu_ul_div_4') {

                                    $('.menu_ul_div').slideUp();//隐藏 */
                                    $('#menu_ul_div_1').slideDown();//显示

                                }
                            }
                        });
                    });
                </script>
                <div class="sidebar">

                    <h2 id="menu1" class="menuTitle">客户管理</h2>
                    <div class="menu_ul_div" id="menu_ul_div_1"

                         style="display:none;">
                        <ul id="menu1_ul" class="menu_ul">
                            <li class="menuItem"><a href="${path}/customer/initConflict.action">客户冲突</a></li>
                            <li class="menuItem"><a href="${path}/customer/initAdd.action">添加客户</a></li>
                            <li class="menuItem"><a href="${path}/customer/initServe.action">服务中签约客户</a></li>
                            <li class="menuItem"><a href="${path}/customer/initNoServe.action">未签约客户</a></li>
                            <li class="menuItem"><a href="${path}/customer/initNoServeFirst.action">未签约-已初试</a></li>
                            <li class="menuItem"><a href="${path}/customer/initNoServeSecond.action">未签约-已复试</a></li>
                            <li class="menuItem"><a href="${path}/customer/getAllSea.action">公海客户</a></li>
                            <li class="menuItem"><a href="${path}/visitRecord/initSearch.action">拜访查询</a></li>
                        </ul>
                    </div>


                    <h2 id="menu2" class="menuTitle">合同管理</h2>
                    <div class="menu_ul_div" id="menu_ul_div_2"

                         style="display:none;">
                        <ul id="menu2_ul" class="menu_ul">
                            <li class="menuItem"><a href="${path}/contractTemplate/initList.action">合同模版</a></li>
                            <li class="menuItem"><a href="${path}/contract/initAdd.action">新增合同</a></li>
                            <li class="menuItem"><a href="${path}/contract/initContractValid.action">有效合同查询</a></li>
                            <li class="menuItem"><a href="${path}/contract/initContractInvalid.action">无效合同查询</a></li>
                            <li class="menuItem"><a href="${path}/contract/initPaymentReceivable.action">应收款查询</a></li>
                            <li class="menuItem"><a href="${path}/contract/initPaymentReceived.action">到款查询</a></li>
                        </ul>
                    </div>


                    <h2 id="menu3" class="menuTitle">报表管理</h2>
                    <div class="menu_ul_div" id="menu_ul_div_3"

                         style="display:none;">
                        <ul id="menu3_ul" class="menu_ul">
                            <li class="menuItem"><a href="${path}/report/initReport.action">拜访量报表</a></li>
                        </ul>
                    </div>


                    <h2 id="menu4" class="menuTitle">系统设置</h2>
                    <div class="menu_ul_div" id="menu_ul_div_4"
                         style="display:block;"
                    >
                        <ul id="menu4_ul" class="menu_ul">
                            <li class="menuItem"><a href="${path}/system/search.action">员工设置</a></li>
                            <li class="menuItem"><a href="${path}/announcement/search.action">公告管理</a></li>
                            <li class="menuItem"><a href="${path}/system/elses.action">其他设置</a></li>
                        </ul>
                    </div>

                </div>
            </div>
        </td>
        <td style="vertical-align: top;">
            <div class="main_right">


                <%--<script type="text/javascript" src="${path}/js/basic.js"></script>--%>
                <link rel="stylesheet" href="${path}/css/themes/base/jquery.ui.all.css">
                <script src="${path}/js/jquery-1.7.2.js"></script>
                <script src="${path}/js/jquery.ui.core.js"></script>
                <script src="${path}/js/jquery.ui.widget.js"></script>
                <script src="${path}/js/jquery.ui.button.js"></script>
                    <link href="${path}/css/jquery.ui.all.css" rel="stylesheet">
                    <link href="${path}/css/jquery.ui.base.css" rel="stylesheet">
                    <link href="${path}/css/jquery.ui.theme.css" rel="stylesheet">
                    <link href="${path}/css/jquery.ui.accordion.css" rel="stylesheet">
                    <link href="${path}/css/jquery.ui.autocomplete.css" rel="stylesheet">
                    <link href="${path}/css/jquery.ui.button.css" rel="stylesheet">
                    <link href="${path}/css/jquery.ui.slider.css" rel="stylesheet">
                    <link href="${path}/css/jquery.ui.datepicker.css" rel="stylesheet">
                    <link href="${path}/css/jquery.ui.dialog.css" rel="stylesheet">
                    <link href="${path}/css/jquery.ui.progressbar.css" rel="stylesheet">
                    <link href="${path}/css/jquery.ui.tabs.css" rel="stylesheet">
                <link rel="stylesheet" href="${path}/css/demos.css">
                <link rel="stylesheet" href="${path}/css/icons.css">
                <script src="${path}/js/icons.js"></script>
                <script type="text/javascript">
                    $(function(){
                        $("#chooseRole").click(function(){
                            var config="resizable:no;center:yes;dialogWidth:500px;dialogHeight:250px;dialogTop:200px;dialogLeft:150px";
                            showModalDialog("${path}/user/initRoleList.action?user.id=${emp.id}" , document ,config);
                        });
                        $( "#date" ).datepicker();
                    });
                </script>
                <style type="text/css">
                    .mytable{
                        width: 60%;
                    }
                    .mytable td{
                        width: 200px;
                    }
                </style>

                <body>
                <!-- 中部DIV -->
                <div class="content">
                    <div class="pageHead">
                        <table>
                            <tr>
                                <th width="8"><img src="${path}/images/c_l.gif" height="31" width="8"/></th>
                                <th align="left" class="title_area">当前位置：客户管理 &gt; 编辑员工信息</th>
                                <th width="9"><img src="${path}/images/c_r.gif" height="31" width="9"></th>
                            </tr>
                        </table>
                    </div>



                    <div class="pageBody">
                        <form:form id="update" name="update" action="${path}/user/update.action" method="post" modelAttribute="user">
                        <%--<form id="update" name="update" action="${path}/user/update.action" method="post">--%>
                            <input type="hidden" name="user.id" value="${emp.id}" id="update_user_id"/>
                            <input type="hidden" name="user.version" value="0" id="update_user_version"/>
                            <table class="mytable">
                                <tr>
                                    <th>工号</th>
                                    <td>
                                        <form:input  path="empNo"/>
                                        <span class="required">*</span>
                                        <form:errors path="empNo"/>
                                    </td>
                                </tr>
                                <tr>
                                    <th>姓名</th>
                                    <td>
                                        <form:input path="realName"/>
                                        <span class="required">*</span>
                                        <form:errors path="realName"/>
                                    </td>
                                </tr>
                                <tr>
                                    <th>登陆账号</th>
                                    <td>
                                        <form:input path="username"/>
                                        <span class="required">*</span>
                                        <form:errors path="username"/>
                                    </td>
                                </tr>
                                <tr>
                                    <th>账号状态</th>
                                    <td>
                                        <c:if test="${emp.valid}" >
                                            <input type="radio" name="user.valid" id="update_user_validtrue" checked value="true"/><label for="update_user_validtrue">启用</label>
                                            <input type="radio" name="user.valid" id="update_user_validfalse"  value="false"/><label for="update_user_validfalse">禁用</label>
                                        </c:if>
                                        <c:if test="${!emp.valid}" >
                                            <input type="radio" name="user.valid" id="update_user_validtrue" value="true"/><label for="update_user_validtrue">启用</label>
                                            <input type="radio" name="user.valid" id="update_user_validfalse" checked value="false"/><label for="update_user_validfalse">禁用</label>
                                        </c:if>
                                    </td>
                                </tr>
                                <tr>
                                    <th>所属部门</th>
                                    <td>
                                        <select name="user.dept.id" id="update_user_dept_id">
                                            <c:forEach items="${departments}" var="dt">
                                                <option value="dt.id">${dt.deptName}</option>
                                            </c:forEach>
                                        </select>

                                    </td>
                                </tr>
                                <tr>
                                    <th>客户上限</th>
                                    <td>
                                        <form:input path="maxCustomer"/>
                                        <span class="required">*</span>
                                        <form:errors path="maxCustomer"/>
                                    </td>
                                </tr>
                                <tr>
                                    <th>性别</th>
                                    <td>
                                        <c:if test="${emp.gender=='MALE'}">
                                            <input type="radio" name="user.gender" id="update_user_genderMALE" value="MALE" checked/><label for="update_user_genderMALE">男</label>
                                            <input type="radio" name="user.gender" id="update_user_genderFEMALE"  value="FEMALE"/><label for="update_user_genderFEMALE">女</label>
                                        </c:if>
                                        <c:if test="${emp.gender=='FEMALE'}">
                                            <input type="radio" name="user.gender" id="update_user_genderMALE" value="MALE"/><label for="update_user_genderMALE">男</label>
                                            <input type="radio" name="user.gender" id="update_user_genderFEMALE" checked value="FEMALE"/><label for="update_user_genderFEMALE">女</label>
                                        </c:if>
                                    </td>
                                </tr>
                                <tr>
                                    <th>生日</th>
                                    <td>

                                        <input type="text" readonly="readonly" name="user.birthDate" id="date" value="${emp.birthDate}" >
                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        <a id="chooseRole" href="#">选择角色</a>
                                    </th>
                                    <td>
                                        <input type="text" name="roleNames" value="财务," readonly="readonly" id="roleListDisplay"/>
                                        <input type="hidden" name="roleIds" value="" id="roleListHidden"/>
                                        <span class="required">*</span>
                                    </td>
                                </tr>
                                <tr>
                                    <th>手机</th>
                                    <td>
                                        <input type="text" name="user.telephone" value="${emp.telephone}" id="update_user_telephone"/>
                                    </td>
                                </tr>
                                <tr>
                                    <th>备注</th>
                                    <td>
                                        <textarea name="user.remarks" cols="18" rows="4" id="update_user_remarks">${emp.remarks}</textarea>
                                    </td>
                                </tr>
                            </table>

                            <div class="buttonBar">
                                <button id="btnSave" type="submit">保存</button>
                            </div>

                        </form:form>




                    </div>
                </div>
                </body>




            </div>
        </td>
    </tr>
</table>

<!--尾部-->
<div class="footer">


    <div class="seperator"></div>
    <p>
        <a href="http://www.sztzedu.com">公司主站</a>|
        <a href="#">隐私策略</a>|
        <a href="#">服务条款</a>&nbsp;
        苏州天智教育公司&reg;版权所有 2012-2015
    </p>

</div>
</body>
</html>
